/*
 * This file is Copyright 2002-2006 Loyola University Chicago,
 * Department of Computer Science and the Emerging Technologies Laboratory.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License via
 *    http://www.apache.org/licenses/LICENSE-2.0.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.citep.formats.ofx;
import javax.swing.text.html.parser.Parser;
import javax.swing.text.html.parser.DTD;
import javax.swing.text.html.parser.TagElement;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.regex.Pattern;
import java.util.regex.*;


public class test extends Parser {
	private static Pattern INTERESTING = Pattern.compile("[&<]");
	private static Pattern STARTTAGOPEN = Pattern.compile("<[>a-zA-Z]");
	
	public test(DTD dtd) {
		super(dtd);
	}
	
	public void startTag(TagElement tag) {
		System.out.println("Start tag: " + tag.getElement().getName());
	}
	
	public static void main(String []  args) throws FileNotFoundException, IOException {
/*		DTD dtd = DTD.getDTD("ofxbank"); //create the dtd

        DataInputStream dis =                         
          new DataInputStream(new FileInputStream("/home/lurker/ofx/spec/ofxmain.dtd"));

        dtd.read(dis); //load the dtd file into the dtd class
        dis.close();

        test t = new test(dtd);
        t.parse(new FileReader("/home/lurker/export.ofx"));*/
		
		Matcher matcher = STARTTAGOPEN.matcher("<test></ofx>");
		String test = "<!-- ";
//		System.out.println(test.substring(2,3));
		System.out.println(":" + matcher.lookingAt());

	
	}
}
